Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure test kit migrators are run only once #154446

Conversation

gsoldevila
Copy link
Contributor

@gsoldevila gsoldevila commented Apr 5, 2023

Fixes #152472 (hopefully)

In the failing test, we were reusing the kibana migrator test kit migrator more than once.
This can lead to unexpected results, as the runMigrations() method closes and flushes logging appenders when it is run.
This PR ensures that each migrator in the test kit is run only once.

@gsoldevila gsoldevila added bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes test-failure-flaky backport:skip This commit does not require backporting Feature:Migrations v8.8.0 labels Apr 5, 2023
@gsoldevila gsoldevila requested a review from a team as a code owner April 5, 2023 12:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 432 435 +3

Total ESLint disabled count

id before after diff
securitySolution 512 515 +3

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@@ -385,6 +391,7 @@ export const getIncompatibleMappingsMigrator = async ({
};

export const readLog = async (logFilePath: string = defaultLogFilePath): Promise<string> => {
await delay(0.1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:i_see_what_you_did_there:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈

@gsoldevila gsoldevila merged commit 1f7aaff into elastic:main Apr 6, 2023
@rudolf rudolf added the Epic:ScaleMigrations Scale upgrade migrations to millions of saved objects label Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience Epic:ScaleMigrations Scale upgrade migrations to millions of saved objects Feature:Migrations release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc test-failure-flaky v8.8.0
Projects
None yet
5 participants